package com.gitee.qdbp.general.system.api.personnel.model;

import java.io.Serializable;
import com.gitee.qdbp.base.system.model.IAccountType;

public class AccountBean implements Serializable {

    /** 版本序列号 **/
    private static final long serialVersionUID = 1L;

    /** 租户编号 **/
    private String factory;

    /** 用户类型 **/
    private IAccountType type;

    /** 登录账号(登录名/手机/邮箱) **/
    private String account;

    public AccountBean() {
    }

    public AccountBean(String factory, IAccountType type, String account) {
        this.factory = factory;
        this.type = type;
        this.account = account;
    }

    /** 租户编号 **/
    public String getFactory() {
        return factory;
    }

    /** 租户编号 **/
    public void setFactory(String factory) {
        this.factory = factory;
    }

    /** 用户类型 **/
    public IAccountType getType() {
        return type;
    }

    /** 用户类型 **/
    public void setType(IAccountType type) {
        this.type = type;
    }

    /** 登录账号(登录名/手机/邮箱) **/
    public String getAccount() {
        return account;
    }

    /** 登录账号(登录名/手机/邮箱) **/
    public void setAccount(String account) {
        this.account = account;
    }

    public String toString() {
        StringBuilder buffer = new StringBuilder();
        if (factory != null) {
            if (buffer.length() > 0) {
                buffer.append(",");
            }
            buffer.append("factory:").append(factory);
        }
        if (type != null) {
            if (buffer.length() > 0) {
                buffer.append(",");
            }
            buffer.append("type:").append(type);
        }
        if (account != null) {
            if (buffer.length() > 0) {
                buffer.append(",");
            }
            buffer.append("phone:").append(account);
        }
        return "{" + buffer.toString() + "}";
    }
}
